<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class CreateIndexTenantIdInTenantGroupTable extends AbstractMigration
{
    public function up()
    {
        $this->table('tenant_group')
            ->addIndex(['tenant_id'],
                [
                    'type' => 'normal',
                    'name' => 'idx_tenant_id',
                ])
            ->save();
    }

    public function down()
    {
        $this->table('tenant_group')
            ->removeIndexByName('idx_tenant_id')
            ->save();
    }
}
